//
//  ChatBoxView.h
//  ChangChat
//
//  Created by Cocoa on 2019/8/23.
//  Copyright © 2019 yibai. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ChatFaceItem.h"

#define Box_Margin 10
#define Box_Btn_Size 30
#define Box_Send_Width 45

typedef NS_ENUM(NSUInteger, ChatBoxStatus) {
    ChatBoxStatusNothing,
    ChatBoxStatusKeyboard,
    ChatBoxStatusVoice,
    ChatBoxStatusFace,
    ChatBoxStatusMore
};
@class ChatBoxView;
@protocol ChatBoxViewDelegate <NSObject>

- (void)chatBox:(ChatBoxView *_Nullable)boxView changeFromStatus:(ChatBoxStatus)fromStatus toStatus:(ChatBoxStatus)toStatus;
- (void)chatBox:(ChatBoxView *_Nullable)boxView sendTextMsg:(NSString *_Nonnull)textMsg;
@optional
- (void)chatBox:(ChatBoxView *_Nullable)boxView changeChatBoxViewHeight:(CGFloat)height;
- (void)chatBox:(ChatBoxView *_Nullable)boxView sendVoiceMsg:(NSString * _Nonnull)voicePath voiceDuration:(NSInteger)duration;

@end

NS_ASSUME_NONNULL_BEGIN

@interface ChatBoxView : UIView

@property (nonatomic, weak) id<ChatBoxViewDelegate> delegate;
@property (nonatomic, assign) ChatBoxStatus status;
@property (nonatomic, assign) CGFloat boxHeight;

- (void)addEmojiFace:(ChatFaceItem *)face;
- (void)sendCurrentMsg;
- (void)deleteButtonDown;

@end

NS_ASSUME_NONNULL_END
